package com.ruoyi.netty.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * Netty服务器配置属性
 */
@Configuration
@ConfigurationProperties(prefix = "netty")
@Data
public class NettyConfig {
    /**
     * Netty服务器端口
     */
    private int port = 8888;
    
    /**
     * Boss线程数
     */
    private int bossThreads = 1;
    
    /**
     * Worker线程数
     */
    private int workerThreads = 4;
    
    /**
     * 是否开启心跳检测
     */
    private boolean keepAlive = true;
    
    /**
     * 心跳超时时间(秒)
     */
    private int timeout = 180;
} 